using UnityEngine;
using UnityEngine.Events;

public class TutorialStep5 : MonoBehaviour
{
	[SerializeField]
	private GameObject arrow;

	[SerializeField]
	private GUIButton target;

	private UnityAction stepDone;

	private void Start()
	{
		int @int = PlayerPrefs.GetInt("Tutorial");
		if (@int < 5)
		{
			arrow.SetActive(@int == 4);
		}
		else
		{
			arrow.SetActive(value: false);
		}
	}

	private void StepDone()
	{
		arrow.SetActive(value: false);
		PlayerPrefs.SetInt("Tutorial", 5);
		target.onClicked.RemoveListener(stepDone);
		Object.FindObjectOfType<TutorialStep6>().Active();
	}

	public void Active()
	{
		arrow.SetActive(value: true);
		stepDone = StepDone;
		target.onClicked.AddListener(stepDone);
	}
}
